package com.easonji.attendance.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 假期
 * </p>
 *
 * @author easonji
 * @since 2018-09-23
 */

@TableName("att_vacation")

public class Vacation extends Model<Vacation> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "v_id", type = IdType.AUTO)
    private Integer vId;

    @NotEmpty(message = "年度不能为空")
    @TableField("v_year")
    private String vYear;

    @NotNull(message = "用户不能为空")
    @TableField("v_user")
    private Integer vUser;

    @NotNull(message = "年休假天数不能为空")
    @TableField("v_day_num")
    private Integer vDayNum;

    @TableField("v_day_num_remain")
    private Integer vDayNumRemain;

    @TableField("v_create_user")
    private Integer vCreateUser;

    @TableField("v_create_date")
    private Date vCreateDate;

    @TableField("v_update_user")
    private Integer vUpdateUser;

    @TableField("v_update_date")
    private Date vUpdateDate;

    public Integer getvId() {
        return vId;
    }

    public void setvId(Integer vId) {
        this.vId = vId;
    }
    public String getvYear() {
        return vYear;
    }

    public void setvYear(String vYear) {
        this.vYear = vYear;
    }
    public Integer getvUser() {
        return vUser;
    }

    public void setvUser(Integer vUser) {
        this.vUser = vUser;
    }
    public Integer getvDayNum() {
        return vDayNum;
    }

    public void setvDayNum(Integer vDayNum) {
        this.vDayNum = vDayNum;
    }
    public Integer getvDayNumRemain() {
        return vDayNumRemain;
    }

    public void setvDayNumRemain(Integer vDayNumRemain) {
        this.vDayNumRemain = vDayNumRemain;
    }
    public Integer getvCreateUser() {
        return vCreateUser;
    }

    public void setvCreateUser(Integer vCreateUser) {
        this.vCreateUser = vCreateUser;
    }
    public Date getvCreateDate() {
        return vCreateDate;
    }

    public void setvCreateDate(Date vCreateDate) {
        this.vCreateDate = vCreateDate;
    }
    public Integer getvUpdateUser() {
        return vUpdateUser;
    }

    public void setvUpdateUser(Integer vUpdateUser) {
        this.vUpdateUser = vUpdateUser;
    }
    public Date getvUpdateDate() {
        return vUpdateDate;
    }

    public void setvUpdateDate(Date vUpdateDate) {
        this.vUpdateDate = vUpdateDate;
    }

    @Override
    protected Serializable pkVal() {
        return this.vId;
    }

    @Override
    public String toString() {
        return "Vacation{" +
        "vId=" + vId +
        ", vYear=" + vYear +
        ", vUser=" + vUser +
        ", vDayNum=" + vDayNum +
        ", vDayNumRemain=" + vDayNumRemain +
        ", vCreateUser=" + vCreateUser +
        ", vCreateDate=" + vCreateDate +
        ", vUpdateUser=" + vUpdateUser +
        ", vUpdateDate=" + vUpdateDate +
        "}";
    }
}
